package com.dxj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dxj.domain.Role;
import com.dxj.domain.UserRole;
import com.dxj.response.UserRoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author dxj
 * @Description RoleMapper
 * @date 2024/7/30 18:25
 */
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 通过用户id获取用户角色
     * @return
     */
    Set<String> getRoleById(@Param("userId") Long userId);

    /**
     * 通过用户id集合获取用户角色
     * @param userIds
     * @return
     */
    List<UserRoleVo> getUserRoleByIds(@Param("userIds") Long []userIds);
}
